
from selenium.webdriver.support import expected_conditions as EC
from time import sleep


from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait

from autoTest_ecshop_new.base_page.base import BasePage

class HomePage(BasePage):

    #定位器
    # 搜索框
    search_loc = (By.XPATH, '//form[@id="searchForm"]/input[1]')

    # 点击搜索按钮
    searchBtn_loc = (By.XPATH, '//form[@id="searchForm"]/input[2]')
    # 点击购买按钮
    buyBtn_loc = (By.XPATH, '//div[@class="goodsItem"]/a[1]')
    # 点击确认购买
    buyConfirm_loc = (By.XPATH, '//li[@class="padd"]/a[1]')

    deleteBtn_loc = (By.XPATH, '//tr/td[@align="center"][7]/a[1]')
    # 购物车结算
    cart_loc = (By.XPATH, '//tr/td[@bgcolor="#ffffff"][2]/a/img')
    # 结算订单确认
    orderConfirm_loc = (By.XPATH, '//div[@align="center"]/input[@type="image"]')

    #查看购物车按钮
    cartBtn_loc = (By.XPATH, '//li[@class="clearfix"]/a[@href="flow.php"]')

